package cn.lyvust.pet;

/**
 * Description:
 * date: 2021-4-7 22:36
 *
 * @author Guo_guo
 * @since JDK 1.8
 */
public class Dog extends Pet{
    private String strain="牧羊犬";// 品种

    //无参构造方法
    public Dog() {
//        System.out.println("子类Dog无参构造方法");
    }

    public Dog(String name,String strain){
        super(name);
        this.strain=strain;
        System.out.println("子类Dog带参构造方法");
    }

    public String getStrain() {
        return strain;
    }

    public void setStrain(String strain) {
        this.strain = strain;
    }
}
